package com.github.tommas.admintpl.common;

public class ServiceException extends RuntimeException {
    private long code;

    public ServiceException(long code, String message) {
        this(code, message, null);
    }

    public ServiceException(String message, Throwable throwable) {
        this(CommonResultCode.FAILED.getCode(), message, throwable);
    }

    public ServiceException(long code, String message, Throwable throwable) {
        super(message, throwable);
        this.code = code;
    }

    public long getCode() {
        return code;
    }
}
